<?php
// retrieve any state parameters (temporary session variables that are not stored in db)

$AppUI->savePlace();

if (isset($_GET['tab'])) {
	$AppUI->setState('QuotationsIdxTab', $_GET['tab']);		// saves the current tab box state
}
$tab = $AppUI->getState('QuotationsIdxTab') !== NULL ? $AppUI->getState('QuotationsIdxTab') : 0;
$active = intval(!$AppUI->getState('QuotationsIdxTab'));


// setup the title block with Name, Icon and Help
$titleBlock = new CTitleBlock('Quotations', 'quotations.jpg', $m, "$m.$a");
$titleBlock->addCell();

// adding the 'add'-Button if user has writePermissions
if ($canEdit) {
	$titleBlock->addCell(
		'<input type="submit" class="button" value="'.$AppUI->_('new quotation').'">', '',
		'<form action="?m=quotations&a=quote_crud" method="post">', '</form>'
	);
}
$AppUI->savePlace();

$titleBlock->show();	//finally show the titleBlock

// now prepare and show the tabbed information boxes with the dPFramework

// build new tab box object
$tabBox = new CTabBox('?m=quotations', $tab);
//$tabBox = new CTabBox("?m=quotation", "{$dPconfigroot_dir->'root_dir'}/modules/quotation/", $tab);
$tabBox->add('quote_list', 'Quotation List');
$tabBox->add('quote_advance_search', 'Quotation Advance Search');
$tabBox->show();

// this is the whole main site!
// and in the subroutine do_quote_aed.php
?>